﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Login.aspx.cs" Inherits="Login" %>

<!doctype html>
<html class="x-admin-sm">
<head runat="server">
    <meta charset="UTF-8">
    <title>设备管理后台登录</title>
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <link rel="stylesheet" href="./css/font.css">
    <link rel="stylesheet" href="./css/xadmin.css">
    <script type="text/javascript" src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
    <script src="./lib/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="./js/xadmin.js"></script>
    <script type="text/javascript" src="./js/cookie.js"></script>
    <%--    <style>
        .linkbuttonlist{
            text-align:left;
            vertical-align:bottom;
            font-size:16px;
        }

    </style>--%>
</head>
<body class="login-bg">

    <div class="login layui-anim layui-anim-up">
        <div class="message">设备管理后台登录</div>
        <div id="darkbannerwrap"></div>
        <form runat="server" method="post" class="layui-form">
            <asp:TextBox ID="FLogin" runat="server" lay-verify="required" class="layui-input" placeholder="用户名"></asp:TextBox>
            <hr class="hr15">
            <asp:TextBox ID="FPass" runat="server" lay-verify="required" class="layui-input" placeholder="密码" TextMode="Password"></asp:TextBox>
            <hr class="hr15">
            <asp:DropDownList ID="DropDownList1" runat="server" Font-Size="16px">
                <asp:ListItem Value="0">设备工程师</asp:ListItem>
                <asp:ListItem Value="1">管理员</asp:ListItem>
            </asp:DropDownList>
            <hr class="hr15">
            <asp:Button ID="IBtLogin" runat="server" Text="登录" OnClick="IBtLogin_Click" />
            <hr class="hr20">
            <div style="text-align: center">
                <asp:Label ID="Label1" runat="server" ForeColor="Red"></asp:Label></div>
            <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionStringProManage %>" SelectCommand="SELECT [uername], [password], [usertype] FROM [Users] WHERE (([uername] = @uername) AND ([password] = @password) AND ([usertype] = @usertype) and flag=1)">
                <SelectParameters>
                    <asp:ControlParameter ControlID="FLogin" Name="uername" PropertyName="Text" Type="String" />
                    <asp:ControlParameter ControlID="FPass" Name="password" PropertyName="Text" Type="String" />
                    <asp:ControlParameter ControlID="DropDownList1" Name="usertype" PropertyName="SelectedValue" Type="Int32" />
                </SelectParameters>
            </asp:SqlDataSource>
            <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="uername" DataSourceID="SqlDataSource1">
                <Columns>
                    <asp:BoundField DataField="uername" HeaderText="uername" ReadOnly="True" SortExpression="uername" />
                    <asp:BoundField DataField="password" HeaderText="password" SortExpression="password" />
                </Columns>
            </asp:GridView>
        </form>
    </div>

</body>
</html>
